Humans are able to visually perceive three-dimensional objects in three-dimensional space. This ability is known as stereopsis. Stereopsis occurs when a human brain recognizes an object in three-dimensions on the basis of two images, received by the right and the left eyes, respectively. In other words, it is necessary for each of the right and the left eyes to receive an image for stereopsis to occur.
A technique called stereography has been developed, in which image processing is performed on a two-dimensional image so that a viewer can perceive the processed two-dimensional planar image as a three-dimensional image. Stereography involves an image processing technique of revising image data of a single two-dimensional planar image to generate image data for each of the right and left eyes. Specifically, the image data for each of the right and left eyes is generated by calculating a binocular parallax with regard to an object (subject) depicted in an image and displacing, according to the parallax, positions of pixels (dots) of the image in right and left directions, respectively.
For example, the parallax is determined by a value representative of the degree of a farness (or nearness) of an object (hereinafter referred to as a Z-value), which is calculated on the basis of at least one of saturation, brightness, and hue of the object. For example, Japanese patent JP2002-123842A discloses a method for determining a Z-value on the basis of saturation and brightness of the original 2D image. Specifically, the method includes: (a) a step of determining Z-values for each pixel on the basis of saturation of the image data; (b) a step of determining a contour line(s) of the object(s) included in the image; (c) a step of calculating an average of the Z-values of all pixels within the object, and (d) a step of determining that the average is a Z-value of the object. A parallax with respect to the object is determined on the basis of the Z-value of the object.
In addition, to improve perception of the generated 3D image, saturation of pixels near the object is changed so as to “blur” an edge of the object. It is to be noted that such a blurring process depends on an empirical rule, that is, the fact the farther away an object is located in an image, the fainter its image is (namely, the lower its saturation is), and the nearer the object is located, the sharper its image is (namely, the higher its saturation is). This is because edges of distant objects tend to be fine due to dust in the air and the like, blurring the object. Nearby objects increase in number and in saturation, and edges of the objects are thicker and thus look sharper.
However, there are images that do not follow the above rule, such as an image in which a bright sky is depicted at a far distance and a dark-colored forest at a near distance. In such a case, the rule on which a Z-value is calculated does not represent a true depth of objects. As a result, it is not possible to reproduce a correct parallax with the generated stereographic image, and a viewer is thus given an unnatural impression.
Further, in a case where a shadow or a highlight hangs over a certain portion of an object, in other words in a case where a variation of saturation within the object is considerable, it is not possible to calculate a true Z-value of the object. As a result, a generated stereographic image gives a viewer an impression that only the overhanging portion is projected (or recessed) locally. In this case, since it is not possible to determine an edge of objects precisely, the blurring process cannot contribute to improvement of plasticity of the 3D image.
Still further, in a highlighted portion of an object in which a Z-value becomes larger, a parallax of that portion is overestimated accordingly. As a result, a phenomenon will occur in which adjacent pixels in an original 2D image are displaced in opposite horizontal directions when generating a stereographic image. This phenomenon is called a pixel crossing, generating a distorted portion in the generated stereographic image. As a result, a quality of a generated stereographic image is reduced to such an extent that it cannot be appreciated by a viewer. Occurrence of this phenomenon is especially serious at a position where a number of objects overlap. At such a position, distortion of the image can occur easily; thus it becomes significantly difficult to achieve natural perception of a stereographic image for a viewer.
As is described above, since it is not possible in the prior art to calculate a correct Z-value from an original image data to generate a stereographic image, generation of a realistic stereographic image is difficult.